package cn.m3a1.bean;

import cn.m3a1.util.GlobalUtils;

public class AbsentNote {
    private Integer id;

    private Integer classid;

    private Integer studentid;

    private String reason;

    private String period;

    private String extfile;

    private Integer type;

    private Integer managercfm;

    private Integer managerid;

    private String managermark;

    private Integer courseid;

    private Integer teachercfm;

    private String teachermark;

    private Long timestamp;

    private Integer status;

    private Integer teacherid;
    private  User user;

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public AbsentNote() {
        managercfm=0;
        teachercfm=0;
        status=0;
        teacherid=0;
        courseid=0;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getClassid() {
        return classid;
    }

    public void setClassid(Integer classid) {
        this.classid = classid;
    }

    public Integer getStudentid() {
        return studentid;
    }

    public void setStudentid(Integer studentid) {
        this.studentid = studentid;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason == null ? null : reason.trim();
    }

    public String getPeriod() {
        return period;
    }

    public void setPeriod(String period) {
        this.period = period == null ? null : period.trim();
    }

    public String getExtfile() {
        return extfile;
    }

    public void setExtfile(String extfile) {
        this.extfile = extfile == null ? null : extfile.trim();
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getManagercfm() {
        return managercfm;
    }

    public void setManagercfm(Integer managercfm) {
        this.managercfm = managercfm;
    }

    public Integer getManagerid() {
        return managerid;
    }

    public void setManagerid(Integer managerid) {
        this.managerid = managerid;
    }

    public String getManagermark() {
        return managermark;
    }

    public void setManagermark(String managermark) {
        this.managermark = managermark == null ? null : managermark.trim();
    }

    public Integer getCourseid() {
        return courseid;
    }

    public void setCourseid(Integer courseid) {
        this.courseid = courseid;
    }

    public Integer getTeachercfm() {
        return teachercfm;
    }

    public void setTeachercfm(Integer teachercfm) {
        this.teachercfm = teachercfm;
    }

    public String getTeachermark() {
        return teachermark;
    }

    public void setTeachermark(String teachermark) {
        this.teachermark = teachermark == null ? null : teachermark.trim();
    }

    public Long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getTeacherid() {
        return teacherid;
    }

    public void setTeacherid(Integer teacherid) {
        this.teacherid = teacherid;
    }
    /**
     * timeStr
     * @return
     */
    public String getTimeStr() {
        if(timestamp>0) {
            return GlobalUtils.timeToDateString(timestamp, "yyyy-MM-dd");
        }
        return "";
    }
    @Override
    public String toString() {
        return "AbsentNote{" +
                "id=" + id +
                ", classid=" + classid +
                ", studentid=" + studentid +
                ", reason='" + reason + '\'' +
                ", period='" + period + '\'' +
                ", extfile='" + extfile + '\'' +
                ", type=" + type +
                ", managercfm=" + managercfm +
                ", managerid=" + managerid +
                ", managermark='" + managermark + '\'' +
                ", courseid=" + courseid +
                ", teachercfm=" + teachercfm +
                ", teachermark='" + teachermark + '\'' +
                ", timestamp=" + timestamp +
                ", status=" + status +
                ", teacherid=" + teacherid +
                '}';
    }
}